/**
 * 
 */
package com.axt.dbaudit.unitTest;

import java.util.List;

import com.axt.dbaudit.bean.cfg.AlertCfgBean;
import com.axt.dbaudit.model.AlertCfg;

/**
 * @author wangyl
 *
 */
public class SoaAlertCfg {

	/**
	 *  testQueryAlertCfg
	 */
	void testQueryAlertCfg()
	{
		List<AlertCfg> aAlertCfg =null;
		aAlertCfg = new AlertCfgBean().queryAlertCfg();
		if (aAlertCfg != null)
		{
			System.out.println("获取报警方式配置成功");
		}
	}
	/**
	 * 
	 * @param args
	 */
	void testUpdateAlertCfg()
	{
		AlertCfg aAlertCfg = new AlertCfg();
		aAlertCfg.setAu_isEnableBubbleAlert(0);
		aAlertCfg.setAu_eHighRisk(0);
		aAlertCfg.setAu_bMiddleRisk(0);
		aAlertCfg.setAu_eLowRisk(0);
		aAlertCfg.setAu_alertInterval(30);
		aAlertCfg.setAu_isEnableBubbleAlert(1);
		aAlertCfg.setAu_bHighRisk(0);
		aAlertCfg.setAu_bMiddleRisk(0);
		aAlertCfg.setAu_bLowRisk(1);
		aAlertCfg.setAu_isEnableSoundAlert(0);
		aAlertCfg.setAu_FilePath("www");
		boolean bRet = false;
    	bRet = new AlertCfgBean().updateAlertCfg(aAlertCfg);
    	if (bRet)
		{
			System.out.println("更新报警方式配置成功！");
		}
		
	}
	public static void main(String[] args) {
		new SoaAlertCfg().testQueryAlertCfg();
		new SoaAlertCfg().testUpdateAlertCfg();
	}

}
